#include <stdio.h>
#include <math.h>
#include <time.h>
int main()
{
	int i,j,a[100];
	float k,b[100];
	srand((unsigned)time(NULL));
	for(i=1;i<=100;i++)
		{
			j=rand()%100;
			a[i]=j;
			k=1.0/j;
			b[i]=k;
			printf("%d %d %f\n",i,j,k);
		}
	int max1,min1,h1=0;
	float max2,min2,ave1,ave2,h2=0;
	max1=min1=a[1];
	max2=min2=b[1];
	for(i=1;i<=100;i++)
	{
		if(a[i]>max1)
			max1=a[i];
		if(b[i]>max2)
			max2=b[i];
		if(a[i]<min1)
			min1=a[i];
		if(b[i]<min2)
			min2=b[i];
		h1=h1+a[i];
		h2=h2+b[i];
	}
	printf("max %d  %f\n",max1,max2);
	printf("min %d  %f\n",min1,min2);
	printf("ave1 %d  %f\n",h1/100,h2/100);
}

